package top.aigoo.project01.entity.dto;

import top.aigoo.project01.entity.PersonInfo;
import top.aigoo.project01.entity.WechatAuth;
import top.aigoo.project01.enums.PersonInfoStateEnum;
import top.aigoo.project01.enums.PersonInfoStateEnum;

import java.util.List;

/**
 * @Description: 微信用户
 * @Author: Mr.OYSHUO.欧阳大叔  mail:1642302522@qq.com
 * @Version 1.0.0
 * @Date: 2021/9/10 22:14
 */
public class PersonInfoExecution {
    //状态
    private int state;
    //结果
    private String stateInfo;
    // 数量
    private int count;

    private PersonInfo personInfo;

    private List<PersonInfo> personInfoList;

    /**
     * 无参构造器
     */
    public PersonInfoExecution() {
    }

    //创建失败使用的构造器
    public PersonInfoExecution(PersonInfoStateEnum personInfoStateEnum) {
        this.state = personInfoStateEnum.getState();
        this.stateInfo = personInfoStateEnum.getStateInfo();
    }

    //执行增、删、改，成功后使用的构造器
    public PersonInfoExecution(PersonInfoStateEnum personInfoStateEnum, PersonInfo personInfo) {
        this.state = personInfoStateEnum.getState();
        this.stateInfo = personInfoStateEnum.getStateInfo();
        this.personInfo = personInfo;
    }

    //执行查找，成功后使用的构造器
    public PersonInfoExecution(PersonInfoStateEnum personInfoStateEnum, List<PersonInfo> personInfoList) {
        this.state = personInfoStateEnum.getState();
        this.stateInfo = personInfoStateEnum.getStateInfo();
        this.personInfoList = personInfoList;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getStateInfo() {
        return stateInfo;
    }

    public void setStateInfo(String stateInfo) {
        this.stateInfo = stateInfo;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public PersonInfo getPersonInfo() {
        return personInfo;
    }

    public void setPersonInfo(PersonInfo personInfo) {
        this.personInfo = personInfo;
    }

    public List<PersonInfo> getPersonInfoList() {
        return personInfoList;
    }

    public void setPersonInfoList(List<PersonInfo> personInfoList) {
        this.personInfoList = personInfoList;
    }
}
